package org.cloud.im.core.listener;

import org.cloud.im.core.ImChannelContext;
import org.cloud.im.core.exception.ImException;
import org.cloud.im.core.packets.User;

/**
 * @Author: w.weidong.lin@abite.com
 * @Description: 绑定/解绑用户监听器
 * @Date: create in 2021/10/19 15:02
 */
public interface ImUserListener {
    /**
     * 绑定用户后回调该方法
     *
     * @param imChannelContext IM通道上下文
     * @param user             绑定用户信息
     * @throws Exception
     * @author WChao
     */
    void onAfterBind(ImChannelContext imChannelContext, User user) throws ImException;

    /**
     * 解绑用户后回调该方法
     *
     * @param imChannelContext IM通道上下文
     * @param user             解绑用户信息
     * @throws Exception
     * @author WChao
     */
    void onAfterUnbind(ImChannelContext imChannelContext, User user) throws ImException;
}
